package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 运营端服务人员审核接口
 * @author lww
 */
@Api("运营端 - 服务人员审核接口")
@RequestMapping("/operation/worker-certification-audit")
@RestController
public class WorkerCertificationAuditController {
    @Resource
    private WorkerCertificationAuditService workerCertificationAuditService;

    @ApiOperation("审核服务人员认证分页查询")
    @GetMapping("/page")
//    @ApiImplicitParam()
    public PageResult<WorkerCertificationAuditResDTO> queryPage( WorkerCertificationAuditPageQueryReqDTO dto){
        return workerCertificationAuditService.queryPage(dto);
    }

    @ApiOperation("审核服务人员认证信息")
    @PutMapping("/audit/{id}")
    public void audit(CertificationAuditReqDTO dto,
                        @PathVariable(value = "id") Long id ){
        workerCertificationAuditService.audit(dto,id);
    }
}
